package com.example.admin.kline;

import com.github.mikephil.charting.components.AxisBase;
import com.github.mikephil.charting.data.Entry;
import com.github.mikephil.charting.formatter.IAxisValueFormatter;
import com.github.mikephil.charting.formatter.IValueFormatter;
import com.github.mikephil.charting.utils.ViewPortHandler;

import java.util.List;

/**
 * Created by admin on 2018/3/18.
 */

public class DateFormatter implements IAxisValueFormatter, IValueFormatter {

    private List<String> mValues;
    public DateFormatter(List<String> values) {
        mValues=values;
    }

    @Override
    public String getFormattedValue(float value, AxisBase axis) {
        return mValues.get((int) value);
    }


    @Override
    public String getFormattedValue(float value, Entry entry, int dataSetIndex, ViewPortHandler viewPortHandler) {
        return null;
    }
}
